package com.ruoyi.personal.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.personal.mapper.DirectRelativesMapper;
import com.ruoyi.personal.domain.DirectRelatives;
import com.ruoyi.personal.service.IDirectRelativesService;

/**
 * 直属亲人，用于记录直属亲人的相关信息Service业务层处理
 * 
 * @author qjp
 * @date 2024-09-11
 */
@Service
public class DirectRelativesServiceImpl implements IDirectRelativesService 
{
    @Autowired
    private DirectRelativesMapper directRelativesMapper;

    /**
     * 查询直属亲人，用于记录直属亲人的相关信息
     * 
     * @param id 直属亲人，用于记录直属亲人的相关信息主键
     * @return 直属亲人，用于记录直属亲人的相关信息
     */
    @Override
    public DirectRelatives selectDirectRelativesById(Long id)
    {
        return directRelativesMapper.selectDirectRelativesById(id);
    }

    /**
     * 查询直属亲人，用于记录直属亲人的相关信息列表
     * 
     * @param directRelatives 直属亲人，用于记录直属亲人的相关信息
     * @return 直属亲人，用于记录直属亲人的相关信息
     */
    @Override
    public List<DirectRelatives> selectDirectRelativesList(DirectRelatives directRelatives)
    {
        return directRelativesMapper.selectDirectRelativesList(directRelatives);
    }

    /**
     * 新增直属亲人，用于记录直属亲人的相关信息
     * 
     * @param directRelatives 直属亲人，用于记录直属亲人的相关信息
     * @return 结果
     */
    @Override
    public int insertDirectRelatives(DirectRelatives directRelatives)
    {
        return directRelativesMapper.insertDirectRelatives(directRelatives);
    }

    /**
     * 修改直属亲人，用于记录直属亲人的相关信息
     * 
     * @param directRelatives 直属亲人，用于记录直属亲人的相关信息
     * @return 结果
     */
    @Override
    public int updateDirectRelatives(DirectRelatives directRelatives)
    {
        return directRelativesMapper.updateDirectRelatives(directRelatives);
    }

    /**
     * 批量删除直属亲人，用于记录直属亲人的相关信息
     * 
     * @param ids 需要删除的直属亲人，用于记录直属亲人的相关信息主键
     * @return 结果
     */
    @Override
    public int deleteDirectRelativesByIds(Long[] ids)
    {
        return directRelativesMapper.deleteDirectRelativesByIds(ids);
    }

    /**
     * 删除直属亲人，用于记录直属亲人的相关信息信息
     * 
     * @param id 直属亲人，用于记录直属亲人的相关信息主键
     * @return 结果
     */
    @Override
    public int deleteDirectRelativesById(Long id)
    {
        return directRelativesMapper.deleteDirectRelativesById(id);
    }
}
